package com.pucong.gitee.database.backup.business.service.service;

import com.pucong.gitee.database.backup.business.service.vo.ServiceFileVo;
import com.pucong.gitee.database.backup.common.entity.service.ServiceFile;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface ServiceFileService {

    ServiceFile getFileServerById(String id);

    int insertFileServer(ServiceFile serviceFile);

    int updateFileServerById(String id, ServiceFile serviceFile);

    /**
     * 获取文件服务的目录列表
     * @param id
     * @param cataloguePath
     * @return
     */
    List<ServiceFileVo> getFileServerCatalogueById(String id, String cataloguePath);

    Boolean uploadFile(String uuid, MultipartFile file, String path);

    Boolean deleteFile(String uuid, String path);

    void downLoadFileByPath(String uuid, String path, HttpServletResponse response);

    void lookFileByPath(String uuid, String path, HttpServletResponse response);
}
